// components/DefineNavigationBar/DefineNavigationBar.js
const app = getApp();
Component({

    properties: {
        title: String,
        isHost: Boolean,
        color: String,
        bgUrl: String,
        bgColor: String,
        fontColor: String,
        backgroundImage: String,
        iconColor: String,
        fontSize: String,
    },

    options: {
        styleIsolation: 'isolated'
    },
    data: {
        navBarHeight: app.globalData.navBarHeight,
        menuHeight: app.globalData.menuHeight,
        menuTop: app.globalData.menuTop,
        pageList: []
    },
    lifetimes: {
        attached: function () {
            let that = this;
            this.setData({
                pageList: getCurrentPages()
            });
        },
        detached: function(){
        }
    },
    methods: {
        back: function () {
            wx.navigateBack({
                delta: 0,
            })
        },
        goHome: function () {
            wx.switchTab({
                url: '/pages/index/index',
            })
        }
    }
})